package bo.zhao.action.strategy.config_decoupled;

public class DAO {
	
	private DBTreaty dbTreaty=null;

	public DBTreaty getDBTreaty() {
		return dbTreaty;
	}

	public void setDBTreaty(DBTreaty dbTreaty) {
		this.dbTreaty = dbTreaty;
	}

	/**
	 * 逻辑删除
	 * 通过配置，指定删除标记字段
	 * */
	public void delete(String table,int id) {
		String sql="update "+table+" set "+dbTreaty.getDeletedField()+"=1  where id="+id;
		System.out.println("执行语句 : "+sql);
	}
	
}
